package com.aspose.cells;

class zbox implements zahz {
   private boolean a;
   private boolean b;
   private int c = 0;

   public zbox(boolean var1, boolean var2) {
      this.a = var1;
      this.b = var2;
   }

   public boolean a(zagu var1, boolean var2) {
      return var2 && var1 == zzk.a;
   }

   public zagu a(zagu var1, zaay var2, boolean var3) {
      if (this.a) {
         if (!var3 && var1 == zzk.a) {
            ++this.c;
            return null;
         } else {
            var1 = var1.e(var2);
            if (var1 == zzk.a || this.b && var1.b() == 0) {
               return zyw.a;
            } else {
               ++this.c;
               return null;
            }
         }
      } else {
         var1 = var1.e(var2);
         if (var3) {
            if (var1.b() == 3) {
               ++this.c;
               return null;
            }
         } else if (var1.a(var2, 7) != null) {
            ++this.c;
            return null;
         }

         return zyw.a;
      }
   }

   public zagu a(zagu var1, zaay var2, boolean var3, int var4) {
      var1 = var1.e(var2);
      if (var3) {
         if (var1.b() == 3 || this.a && var1 != zzk.a && (!this.b || var1.b() != 0)) {
            this.c += var4;
            return null;
         }
      } else if (var1.b() != 0 && (this.a || var1.a(var2, 7) != null)) {
         this.c += var4;
         return null;
      }

      return zyw.a;
   }

   public zagu a() {
      return new zyy((double)this.c);
   }
}
